<template>
	<view :style="boxStyle">
		<u-cell-group   :border="false">
			<h4 v-if="set.title.length" :style="'padding:6px 10px;color: '+set.title_color">{{set.title}}</h4>
			<u-cell v-for="list in set.cell_list" :clickable="true" :isLink="true" @click="click(list.url)"
			  :titleStyle="set.cell_title_color.length?'color:'+set.cell_title_color:''"
			 :rightIcon="list.right_icon" :icon="list.left_icon" :title="list.title"   
			  :border="list.border==1?true:false">
			  <text class="cell_desc" slot='value' :style="set.cell_desc_color.length?'color:'+set.cell_desc_color:''">{{list.desc}}</text>
			  </u-cell>
		</u-cell-group>
	</view>
</template>

<script>
	export default {
		name:"diy-cell",
		data() {
			return {
				boxStyle:"overflow: hidden;"
			};
		},
		props:{
			 set:{
				type:Object,
			 	default(){
					return {
						  bColor:['#fff'],
						cell_list:{
	
						},
						cell_title_color:"#333",
						cell_desc_color:"#666",
						title:"标题",
						title_color:"#333",
						radius:0
					}
				}
			 }
		},created() {
			this.boxStyle += 'border-radius:'+this.set.radius+'px;';
			this.boxStyle += this.moxi.background(this.set.bColor);
		}
		,methods:{
			click(url){
				this.navto(url)
			}
		}
	}
</script>

<style>
.cell_desc{font-size: 12px;;}
</style>